package com.ming.cloudnote.controller.user;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ming.cloudnote.service.UserService;
import com.ming.cloudnote.util.NoteResult;

@Controller
@RequestMapping("/user")
public class UserRegistCotroller {

	@Resource(name = "userService")
	private UserService userService;

	@RequestMapping("/add.do")
	@ResponseBody
	public NoteResult<Object> execute(String name, String password, String nick) {
		return userService.addUser(name, password, nick);
	}

}
